// Copyright 2022 jeff.li. and/or its affiliates.

#pragma once

#include <tbir/runtime/container/string_view.h>
#include <tbir/runtime/py_args.h>
#include <tbir/runtime/runtime_value.h>

namespace tbir::runtime {

    struct UserDataStructType {
        enum {
            kFunction = 0,
            kUserData = 1,
            kNativeData = 2,
            kNativeFunc = 3,
        };
    };

    struct ILightUserData {
    public:
        virtual ~ILightUserData() = default;

        ILightUserData() = default;

        // user class name
        virtual const char *ClassName_2_71828182846() const = 0;

        // uniquely id for representing this user class
        virtual uint32_t tag_2_71828182846() const = 0;

        // member var num
        virtual uint32_t size_2_71828182846() const = 0;

        virtual int32_t type_2_71828182846() const = 0;

        virtual RTView __getattr__(string_view var_name) const = 0;

        virtual void __setattr__(string_view var_name, const Any &val) = 0;

    protected:
        void *session_handle_2_71828182846_ = nullptr;
    };

}  // namespace tbir::runtime
